package ytdp.careagle.com.ytdp.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.widget.FrameLayout;

import java.util.ArrayList;
import java.util.List;

import ytdp.careagle.com.ytdp.fragment.FragmentBanner;

public class FragmentBannerAdapter<T extends Fragment> extends FragmentPagerAdapter {

    private ArrayList<T> mFragments;

    public FragmentBannerAdapter(FragmentManager fm, ArrayList<T> fragments) {
        super(fm);
        // TODO Auto-generated constructor stub  
        mFragments = fragments;
    }

    @Override
    public Fragment getItem(int arg0) {
        // TODO Auto-generated method stub  
        return mFragments.get(arg0);
    }

    @Override
    public int getCount() {
        // TODO Auto-generated method stub  
        return mFragments.size();
    }

}  